import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const router = new VueRouter({
    routes: [
        { path: '/', redirect: '/home'},
        { 
            path: '/home', 
            component: () => import('@/views/home'),
            children: [
                { path: 'tree', component: () => import('@/views/tree')},
                { path: 'asynctree', component: () => import('@/views/asyncTree')},
                { path: 'magictree', component: () => import('@/views/magicTree')},
                { path: 'magictree2', component: () => import('@/views/magicTree2')},
                { path: 'bigtree', component: () => import('@/views/bigTree')},
                { path: 'simpledatatree', component: () => import('@/views/simpleDataTree')},
                { path: 'searchtree', component: () => import('@/views/searchTree')},
                { path: 'swiper', component: () => import('@/views/swiper')},
                { path: 'scroll', component: () => import('@/views/scrollbar')}, // el-scrollbar                
                { path: 'mousewheel', component: () => import('@/views/mousewheel')}, // 横向滚轮滑动
                { path: 'fasttree', component: () => import('@/views/fasttree')}, // 树优化
            ]
        },
        { path: '/kpi', component: () => import('@/views/kpi/index')},
        { path: '/tabs', component: () => import('@/views/cusTabs/index')},
        { path: '/login', component: () => import('@/views/login/index')},
        { path: '/custom', component: () => import('@/views/custom/index')},
        { path: '/drag', component: () => import('@/views/drag')}, // vuedraggable
        { path: '/projectTree', component: () => import('@/views/projectTree')},
        { path: '/camera', component: () => import('@/views/camera')},
        { path: '/treefilter', component: () => import('@/views/eltree-filter')},
        { path: '/form', component: () => import('@/views/form-demo')},
        { path: '/dragprogress', component: () => import('@/views/dragprogress')}, // 拖拽进度条
        { path: '/signature', component: () => import('@/views/signature')}, // 电子签名      
        { path: '/betterscroll', component: () => import('@/views/betterscrollDemo')}, // betterscroll使用
        { path: '/recursion', component: () => import('@/views/recursion')}, // vue自定义递归组件
    ]
})

export default router